package net.vkits.admin.domain.repository;

import net.vkits.admin.domain.model.Content;
import net.vkits.admin.domain.model.ContentType;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by ethan-liu on 2017/1/14.
 */
public interface ContentRepository extends PagingAndSortingRepository<Content, Long> {
    List<Content> findAll();
    Page<Content> findByType(Pageable pageable, ContentType type);
    Page<Content> findByTypeNot(Pageable pageable, ContentType type);
}
